Skip to content

Use TEE Repo Deployment Scripts#390

Merged
jjeangal merged 6 commits intocelo-integration-rebase-16.2from
update-contract-scripts
Apr 3, 2026
Merged

Use TEE Repo Deployment Scripts#390
jjeangal merged 6 commits intocelo-integration-rebase-16.2from
update-contract-scripts

Conversation

@jjeangal
Copy link
Copy Markdown
Member

@jjeangal jjeangal commented Apr 1, 2026

This PR:

Removes the inline TEE contract deployment logic from this repo and delegates to the scripts in the espresso-tee-contracts submodule. Fixes a build-time artifact collision that was causing DeployOPChain to revert.

Changes:

  • DeployAWSNitroVerifier.s.sol deleted: TEE contract deployment is now handled entirely by DeployTEEVerifier and DeployNitroTEEVerifier from the submodule.
  • DeployEspresso.s.sol simplified: Removed duplicated proxy/verifier deployment logic. Now calls submodule scripts directly for TEE contracts; only retains BatchAuthenticator deployment which is OP-stack-specific.
  • op-deployer pipeline simplified: Reduced boilerplate in opcm/espresso.go and pipeline/espresso.go accordingly.
  • fix-proxy-artifact updated: The recipe already existed but only caught empty bytecode. Updated to also detect when the unversioned ProxyAdmin.json contains OZ v5 bytecode (non-empty but wrong source), using ast.absolutePath as the signal, then restores from ProxyAdmin.0.8.25.json.

The artifact collision:

Importing DeployTEEVerifier brings in OZ v5's TransparentUpgradeableProxy, which hardcodes new ProxyAdmin(...) in its constructor. This causes Foundry to compile the OZ v5 ProxyAdmin and overwrite the unversioned forge-artifacts/ProxyAdmin.sol/ProxyAdmin.json. DeployImplementations.s.sol calls vm.getCode("ProxyAdmin") to build the OPCM blueprint: if it gets OZ v5 bytecode instead of OP's, DeployOPChain reverts.

How to test:

# In packages/contracts-bedrock:
just build-dev        # should print "Fixed ProxyAdmin.json from ProxyAdmin.0.8.25.json"

# Full smoke test:
just smoke-tests      # from repo root

@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Copy Markdown
Member

@shenkeyao shenkeyao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me. A question about the just smoke-tests command in the "How to Test" instruction--we don't have a TEE test in the smoke test suite, right? How does this help with testing the TEE deployment?

@jjeangal
Copy link
Copy Markdown
Member Author

jjeangal commented Apr 3, 2026

Member

You are right, it doesn't add much more to testing the functionality itself. Just that the code still compiles and works as previously.

@jjeangal jjeangal merged commit 9bd9547 into celo-integration-rebase-16.2 Apr 3, 2026
47 of 48 checks passed
@jjeangal jjeangal deleted the update-contract-scripts branch April 3, 2026 21:30
QuentinI pushed a commit that referenced this pull request Apr 9, 2026
* pin to different tee commit

* use updated tee contract scripts

* point to latest tee contract

* use proxy admin from OP repo

* force ref path for proxy artifact

* Point to tee contracts commit at main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants